LINE
LINE is a messaging application that is especially used in Indonesia, Japan, Taiwan and Thailand.
The DRUID Portal allows you to create the bot once and deploy it on LINE. This way, customers will be able to start a conversation with your chat bot in LINE.
Prerequisites
- You built and published a DRUID chat bot.
This section describes how to integrate your chatbot with LINE.
Step 1. Create a channel in the LINE Developers Console
To deploy a DRUID chat bot in LINE, you need to create a channel in the LINE Developers Console. Follow the steps in the documentation below that is relevant to you:
- If you already have a LINE Official account: Adding a channel to your existing LINE Official Account.
- If you don't have a LINE account: Creating a channel on the LINE Developers Console.
Step 2. Get values from your channel settings
After you confirm your channel settings In LINE Developers Console, the channel's configuration page opens on the Basic settings tab. From this page, you get the channel secret and the access token you need to configure your DRUID chat bot.
- Scroll down to the Channel secret field, copy the value and save it, field, you will need it for chat bot configuration.
- Scroll back up and click the Messaging API tab.
- Scroll down at the bottom of the page to the Channel access token area.
- To generate a channel access token, click on the Issue button. Copy the value of the Channel access token (long-lived) and save it, you will need it for chat bot configuration.
The Channel access token does not expire; however, you can generate a new one by clicking the Reissue button.
Step 3. Configure the DRUID chat bot
- Log in the DRUID Portal and go to your bot configuration page.
- Click the Channels tab, then click Line. The Line section expands.
- Enter the Channel access token and the Secret (the Channel access token (long-lived) and Channel secret you copied from your LINE channel).
- Click the Publish button. The channel activation might take up to 1 minute. When the channel activation completes, the Callback URLfield is automatically filled in. Copy the value and save it, you will need it to configure the Line Webhook settings.
After the channel’s activation, the following fields are available in DRUID:
- [[ChatUser]].ChannelId = "line"
- [[ChatUser]].UserId - Stores an unique identifier of the LINE user account.
Step 4. Configure LINE webhook settings
- Go back to the LINE Developers console.
- Select the channel you created earlier from Recently visited channels.
- Select the Messaging API tab and scroll down to the Webhook settings section.
- Click the Edit button, in the Webhook URL field enter the Callback URL you copied from DRUID and click the Update button.
- Click the Verify button under the Webhook URL. A success message will appear if the webhook URL is properly configured.
- Tap on Use webhook.
Step 5. Set the LINE Official Account features
To prevent sending unexpected Auto-reply and Greeting messages to users, follow these steps:
- In LINE Developers console, go your channel settings, Messaging API tab.
- Scroll down to the LINE Official Account features section.
- Click the Edit button corresponding to Auto-reply messages. The Response settings page opens.
- Tap off Greeting message and Auto-response messages.
The changes are automatically saved.
Your bot has been successfully configured to communicate with users on LINE.
Step 6. Make the LINE QR Code public
After you successfully complete the LINE integration, make the LINE channel's QR code available for your customers (either on your website or printed on a paper in the shop).
Get QR code from the LINE Developers console. Go to your channel settings, click the Messaging API tab, right-click on the QR code image and either copy the image link or the image.
Your customers will open the LINE app on their mobile devices and scan the QR code to chat with your bot.